﻿namespace CatClient.Configuration
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    public class Domain
    {
        public Domain(string id = "Unknown", bool enabled = false, int maxQueueSize = 102400, int pool = 1)
        {
            this.Id = id;
            this.Enabled = enabled;
            this.ThreadPool = pool < 1 ? 1 : pool;
            this.ThreadPool = pool > Environment.ProcessorCount ? Environment.ProcessorCount : pool;
            this.MaxQueueSize = ((maxQueueSize > 102400) || (maxQueueSize < 102400)) ? 102400 : maxQueueSize;
        }

        public string Id { get; set; }

        public bool Enabled { get; set; }

        public int MaxQueueSize { get; set; }

        public int ThreadPool { get; set; }
    }
}

